package shixhun;

import java.util.Calendar;

public class rili {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
    int year =   calendar.get(Calendar.YEAR);//获取年
        System.out.println(year);
        int week = calendar.get(Calendar.DAY_OF_WEEK);
        System.out.println(week);//获取实时日期按国际日历，第几天
        calendar.set(Calendar.DATE,calendar.get(Calendar.DATE)+7);//计算七天后是几号
        System.out.println(calendar.get(Calendar.DATE));
    }
}
